package com.example.bpmn.exception;

import lombok.Getter;

@Getter
public class ProcessException extends RuntimeException {
    private final String code;
    private final String message;
    private final String processInstanceId;

    public ProcessException(ErrorCodes errorCode, String processInstanceId) {
        super(errorCode.getMessage());
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
        this.processInstanceId = processInstanceId;
    }

    public ProcessException(String code, String message, String processInstanceId) {
        super(message);
        this.code = code;
        this.message = message;
        this.processInstanceId = processInstanceId;
    }
} 